/*
**  Apache License, Version 2.0
**  Notes:Use this command to anonymously check out the latest project source code:
**  Non-members may check out a read-only working copy anonymously over HTTP.
**  SVN checkout http://YHHLineCommandWsp.googlecode.com/svn/trunk/ 
**
**  Author:		Kevin Yang
**  Email:		Bigearrabbit@qq.com
**
**  DATE:		2013-4-6
**
**  File Name:	YHHELineCommandAdn.cpp
**
**  Notes:
**  Provide implementation to interface CATIShapeDesignWorkshopAddin
*/

// Local Framework
#include "YHHELineCommandAdn.h"

// ApplicationFrame Framework 
#include <CATCreateWorkshop.h> // needed to manage workshop access
#include "CATCommandHeader.h"  // needed to instanciate the header

// Creates the YHHELineCommandAdnHeader command header class
MacDeclareHeader(YHHELineCommandAdnHeader);  

// To declare that the class 
// is a DataExtension of (late type) YHHLineCommandAddin

CATImplementClass ( YHHELineCommandAdn,//ClassName
                    DataExtension,
                    CATBaseUnknown,
                    YHHLineCommandAddin );//Aliase namefor Dico file

// 
// To declare that YHHLineCommandAddin implements CATIShapeDesignWorkshopAddin, insert 
// the following line in the interface dictionary :
//
// YHHLineCommandAddin      CATIShapeDesignWorkshopAddin    libYHHLineCommandAdn

#include <TIE_CATIShapeDesignWorkshopAddin.h> // needed to tie the implementation to its interface
TIE_CATIShapeDesignWorkshopAddin(YHHELineCommandAdn);

// YHHELineCommandAdn : constructor-------------------------------------------------
YHHELineCommandAdn::YHHELineCommandAdn()
{
    
}
// YHHELineCommandAdn : destructor-------------------------------------------------
YHHELineCommandAdn::~YHHELineCommandAdn()
{
    
}
// Implements CATIShapeDesignWorkshopAddin::CreateCommands-------------------------------------------------
void YHHELineCommandAdn::CreateCommands()
{
    
    // Instantiation of the header class created by the macro MacDeclareHeader -
    // commands are always available and are represented by a push button
    
    new YHHELineCommandAdnHeader("YHHLineCommandHdr","YHHLineCommandUI","YHHLineCommandCmd" ,(void *)NULL);
}
// Implements CATIShapeDesignWorkshopAddin::CreateToolbars-------------------------------------------------
CATCmdContainer* YHHELineCommandAdn::CreateToolbars()
{
    
    // YHHLineCommand Toolbar 
    NewAccess        ( CATCmdContainer  , pLineCommandWkb , YHHLineCommandTlb );
    
    NewAccess        ( CATCmdStarter    , pLineCommand    , YHHLineCommandStr );
    SetAccessCommand ( pLineCommand    , "YHHLineCommandHdr" );
    SetAccessChild   ( pLineCommandWkb , pLineCommand  );
   
    AddToolbarView   ( pLineCommandWkb  , 1 , UnDock ); // visible toolbar 

    return pLineCommandWkb;
    
}
//-----------------------------------------------------------------------------

